package com.sy.controller;

import com.sy.dto.DriSchoolDto;
import com.sy.dto.DriSchools;
import com.sy.dto.Params;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DriSchoolController extends BaseController {
    @RequestMapping(value = "driSchool/params", method = RequestMethod.POST)
    public List<DriSchools> getDriSchoolListByParams(@RequestBody Params params){
        return driSchoolService.getDriSchoolListByParams(params);
    }
    @RequestMapping(value = "driSchool", method = RequestMethod.GET,params = {"type=showDriSchool"})
    public DriSchoolDto getDriSchoolById(Integer id){
        return driSchoolService.getDriSchoolById(id);
    }
    @RequestMapping(value = "driSchool", method = RequestMethod.POST)
    public Integer getPagesByParams(@RequestBody Params params){
        return driSchoolService.getCountByParams(params);
    }
}
